<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 三栏布局，左右两列定宽，中间列自适应 position:relative 和absolute */

        .container{
            height: 300px;
            position: relative;
        }

        .left{
            position: absolute;
            width: 200px;
            left: 0;
            background-color: rebeccapurple;
        }
        .center{
            margin-left: 200px;
            margin-right: 200px;
            background-color: aqua;
        }
        /* 或者
        .center{
            position: absolute;
            left: 200px;
            right: 200px;
            background-color: aqua;
        } */
        .right{
            position: absolute;
            width: 200px;
            right: 0;
            background-color: blue;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="left">left</div>         
        <div class="right">right</div>
        <div class="center">
            gggggggggggggggggggggggggggggggggggggggggggggd
            fsdfsgfgfdgfdgfg
        </div>
    </div>
   
</body>
</html>